<template>
  <!-- <h1>专技人才迁入主要内容</h1> -->
  <div class="shenheshauxin">
    <el-tabs
      v-model="activeName"
      type="card"
      @tab-click="handleClick"
      style="margin-bottom: 0px"
    >
      <el-tab-pane label="未审核" name="first">
        <div class="sousuokuang">
          <el-form ref="form" :model="sizeForm" label-width="80px" size="mini">
            <el-input
              v-model="sizeForm.name"
              placeholder="专技人员名称"
            ></el-input>
            <el-input
              v-model="sizeForm.num"
              placeholder="证件号码"
            ></el-input>
            <div
              class="block"
              style="width: 150px; display: inline-block;"
            >
              <span class="demonstration"></span>
              <el-date-picker
              style="width:350px"
                v-model="value1"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              >
              </el-date-picker>
            </div>
            <div
              class="block"
              style="width: 150px; display: inline-block;padding-left:220px;"
            >
              <span class="demonstration"></span>
              <el-date-picker
               style="width:350px"
                v-model="value2"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期(原单位)"
                end-placeholder="结束日期(原单位)"
              >
              </el-date-picker>
            </div>
            <el-form-item size="large">
              <el-button type="primary" @click="onquery">查询</el-button>
              <el-button>重置</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="xianshi">
          <el-button type="primary">批量通过</el-button>
          <el-button type="primary">批量驳回</el-button>
          <div style="margin: 5px 5px">
            <el-table
              ref="multipleTable"
              :data="tableData"
              tooltip-effect="dark"
              border
              style="width: 100%"
              @selection-change="handleSelectionChange"
            >
              <el-table-column type="selection" width="50"> </el-table-column>
              <el-table-column prop="sponsornum" label="编号" width="50">
              </el-table-column>
              <el-table-column prop="sponsortime" label="发起时间">
              </el-table-column>
              <el-table-column prop="sponsorinformation" label="发起人信息">
              </el-table-column>
              <el-table-column prop="sponsorseries" label="原单位名称">
              </el-table-column>
              <el-table-column prop="sponsorspecialized" label="原单位审批时间">
              </el-table-column>
              <el-table-column label="操作" width="240">
                <template>
                  <el-button type="text" size="medium" @click="pass"
                    >通过</el-button
                  >
                  <el-button type="text" size="medium" @click="miss"
                    >驳回</el-button
                  >
                  <el-button type="text" size="medium" @click="details"
                    >详情</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <div>
      <el-pagination background layout="prev, pager, next" :total="1000">
      </el-pagination>
    </div>
      </el-tab-pane>
      <el-tab-pane label="已审核" name="second">
        <div class="sousuokuang">
          <el-form ref="form" :model="sizeForm" label-width="80px" size="mini">
            <el-input
              v-model="sizeForm.name1"
              placeholder="专技人员名称"
            ></el-input>
            <el-input
              v-model="sizeForm.num1"
              placeholder="证件号码"
            ></el-input>
            <el-select v-model="sizeForm.region1" placeholder="审核状态">
              <el-option label="通过" value="通过"></el-option>
              <el-option label="驳回" value="驳回"></el-option>
            </el-select>
            <div
              class="block"
              style="width: 200px; display: inline-block;"
            >
              <span class="demonstration"></span>
              <el-date-picker
              style="width:320px"
                v-model="value3"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              >
              </el-date-picker>
            </div>
            <div
              class="block"
              style="width: 200px; display: inline-block;padding-left:120px;"
            >
              <span class="demonstration"></span>
              <el-date-picker
              style="width:320px"
                v-model="value4"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期(原单位)"
                end-placeholder="结束日期(原单位)"
              >
              </el-date-picker>
            </div>
            <el-form-item size="large">
              <el-button type="primary" @click="onquery">查询</el-button>
              <el-button>重置</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="xianshi">
          <div style="margin: 0px 5px">
            <el-table
              ref="multipleTable"
              :data="tableData"
              tooltip-effect="dark"
              border
              style="width: 100%"
              @selection-change="handleSelectionChange"
            >
              <el-table-column type="selection" width="50"> </el-table-column>
              <el-table-column prop="sponsornum" label="编号" width="50">
              </el-table-column>
              <el-table-column prop="sponsortime" label="申报时间">
              </el-table-column>
              <el-table-column prop="sponsorinformation" label="发起人信息">
              </el-table-column>
              <el-table-column prop="sponsorseries" label="原单位名称">
              </el-table-column>
              <el-table-column prop="sponsorspecialized" label="原单位审批时间">
                </el-table-column>
              <el-table-column prop="sponsorspecialized" label="审批状态">
                </el-table-column>
              <el-table-column label="操作" width="100">
                <template>
                  <el-button type="text" size="medium" @click="details"
                    >详情</el-button
                  >
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <div>
      <el-pagination background layout="prev, pager, next" :total="1000">
      </el-pagination>
    </div>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>


<script>
export default {
  data() {
    return {
      activeName: "first",
      sizeForm: {
        name: "",
        num: "",
        region1: "",
        name1: "",
        num1: "",
      },
      value1: "",
      value2: "",
      value3: "",
      value4: "",
      tableData: [
        {
          sponsornum: "1",
          sponsortime: "2016-05-02",
          sponsorinformation: "王小虎",
          sponsorsex: "男",
          sponsorinformation: "上海市普陀区金沙江路 1518 弄",
          sponsorseries: "社会工作者",
          sponsorspecialized: "社会学",
          sponsorsname: "助理社会工程师",
          sponsortype: "审核中",
        },
        {
          sponsornum: "1",
          sponsortime: "2016-05-02",
          sponsorinformation: "王小虎",
          sponsorsex: "男",
          sponsorinformation: "上海市普陀区金沙江路 1518 弄",
          sponsorseries: "社会工作者",
          sponsorspecialized: "社会学",
          sponsorsname: "助理社会工程师",
          sponsortype: "审核中",
        },
        {
          sponsornum: "1",
          sponsortime: "2016-05-02",
          sponsorinformation: "王小虎",
          sponsorsex: "男",
          sponsorinformation: "上海市普陀区金沙江路 1518 弄",
          sponsorseries: "社会工作者",
          sponsorspecialized: "社会学",
          sponsorsname: "助理社会工程师",
          sponsortype: "审核中",
        },
        {
          sponsornum: "1",
          sponsortime: "2016-05-02",
          sponsorinformation: "王小虎",
          sponsorsex: "男",
          sponsorinformation: "上海市普陀区金沙江路 1518 弄",
          sponsorseries: "社会工作者",
          sponsorspecialized: "社会学",
          sponsorsname: "助理社会工程师",
          sponsortype: "审核中",
        },
      ],
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    onquery() {
      console.log("正在查询!");
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    pass() {
      this.$confirm("是否确认通过?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "通过成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消",
          });
        });
    },
    miss() {
      this.$prompt("是否确认审批驳回" + "</br><h4>驳回原因</h4>", "系统提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        inputValue: "资料不全或者专业不符",
        dangerouslyUseHTMLString: true,
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "驳回成功",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "取消驳回",
          });
        });
    },
    details() {
      this.$router.push("/ApprovalManagement/Details4");
    },
  },
  mounted(){
    sessionStorage.setItem('fName','MigrationIn');
  }
};
</script>

<style lang="less" scoped>
//  将 dangerouslyUseHTMLString属性设置为 true， message就会被当作 HTML 片段处理，就可使用</br>进行换行
* {
  padding: 0;
  margin: 0;
}
.el-pagination {
  text-align: center;
}
.el-form-item {
  float: right;
  margin: 5px 10px;
  height: 40px;
}
.el-button {
  width: 60px;
  height: 28px;
  font: size 28px;
}
.el-select {
  margin: 8px 18px 8px;
  text-align: left;
}
.el-input {
  width: 150px;
  height: 30px;
  margin: 8px 18px 8px;
  text-align: left;
}
body,
html,
#app,
el-aside {
  height: 100%;
}
.InternalNavigation {
  margin: 0px;
  width: 100%;
  height: 50px;
  background-color: rgba(242, 242, 242, 1);
}
.xianshi {
  margin: 0px;
  width: 100%;
  height: 100%;
  background-color: rgba(242, 242, 242, 1);
}
.shenheshauxin {
  height: 100%;
  width: 100%;
}
.sousuokuang {
  width: 100%;
  height: 126px;
  background-color: rgba(242, 242, 242, 0.5);
}
.el-container,
.el-menu {
  height: 100%;
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #ffffff;
  color: #333;
  line-height: 20px;
  margin: 5px 20px 5px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
</style>